<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/6/006
 * Time: 11:25
 */

namespace app\admin\validate;


use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'title'  =>  'require|max:20',
        'cate_id' =>  'require',
        'describe' =>  'require|min:6|max:100',
        'content'=>'require'
    ];

    protected $message = [
        'title.require'  =>  '请填写文章标题',
        'title.max'  =>  '文章标题最多不能超过20位字符',
        'cate_id.require'  =>  '请选择分类',
        'describe.require' =>  '请填写文章描述',
        'describe.min' =>  '文章描述最少为6位字符',
        'describe.max' =>  '文章描述最多为100位字符',
        'content.require' =>  '请填写文章内容',
    ];

}